Skip to content

Jess/697 write preserve enc state - #698

Merged
jesscmoore merged 8 commits into
linkingfrom
jess/697_write_preserve_enc_state
Aug 11, 2026
Merged

Jess/697 write preserve enc state#698
jesscmoore merged 8 commits into
linkingfrom
jess/697_write_preserve_enc_state

Conversation

@jesscmoore

@jesscmoore jesscmoore commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Details

Description

WritePod and writeExternalPod() now check whether file encrypted if existing file, and then preserve that encryption state when overwriting.

Related Issues

Issue #697

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How To Test?

Checklist

  • Screenshots included here/in linked issue #
  • Changes adhere to the style and coding guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules
  • The update contains no confidential information
  • The update has no duplicated content
  • No lint check errors are related to these changes (make prep or flutter analyze lib)
  • Integration test dart test output or screenshot included in issue #
  • I tested the PR on these devices:
    • Android
    • iOS
    • Linux
    • MacOS
    • Windows
    • Web
  • I have identified reviewers
  • The PR has been approved by reviewers

Finalising

  • Merge dev into the this branch
  • Resolve any conflicts
  • Add a one line summary into the CHANGELOG.md
  • Push to the git repository and review
  • Merge the PR into dev

@jesscmoore
jesscmoore changed the base branch from dev to linking July 30, 2026 12:13
@jesscmoore
jesscmoore requested a review from gjwgit July 30, 2026 13:10
@gjwgit
gjwgit requested a review from cdawei July 31, 2026 00:39
final currentContent = utf8.decode(await getResource(fileUrl));
// Determine current encryption state
resolvedEncrypted =
isContentEncrypted(fileUrl: fileUrl, content: currentContent);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jess, thanks for the changes. As I briefly mentioned in the standup. A developer will be able to skip the check of a file's current encryption state by calling writePod() with arguments:

  • encrypted=true
  • overwrite=true

I wonder if any feedback is necessary in such cases (e.g., a warning message, an error or exception)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cdawei I've added an exception to catch the scenario of encrypted = true, overwrite=true on an auth/public shared resource.

@jesscmoore
jesscmoore merged commit a062e81 into linking Aug 11, 2026
18 of 20 checks passed
@jesscmoore
jesscmoore deleted the jess/697_write_preserve_enc_state branch August 11, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants